package com.itheima.String;

public class StringMethoodExt {
    public static void main(String[] args) {
        String s1 = "you can kill me , you kan't fuck me ";
        System.out.println("s1 = " + s1);

        String s2 = s1.toUpperCase();
        System.out.println("s2 = " + s2);

        String s3 = s2.toUpperCase();
        System.out.println("s3 = " + s3);

        String s4 = s3.toUpperCase();
        System.out.println("s4 =" + s4);

        boolean flag1 = s1.contains("fuck1");
        System.out.println("flag1 = " + flag1);

        String s5 = "柳岩";
        boolean flag2 = s5.startsWith("柳");
        System.out.println("flag2 = " + flag2);
        boolean flag3 = s5.endsWith("董岩");
        System.out.println("flag3 = " + flag3);

        String s6 = "上海的自来水来自海上";
        int index = s6.indexOf("海");
        System.out.println("index = " + index);
    }
}
